<?php

	require_once 'View/LoginView.php';
	require_once 'Model/LoginHandler.php';
	require_once 'Controller/LoginController.php';
	require_once 'Helper/Page.php';
	require_once 'View/PageCompositionView.php';
	require_once 'Controller/FileUploadController.php';
	require_once 'Model/FileUploadModel.php';
	
	class MasterController{
		
		private $loginHandler;
		private $loginController;
		private $fileUploadController;
		private $pageCompositionView;
		private $loginPage;
		
		public function __construct(){
			$this->loginHandler = new LoginHandler();
			$this->loginController = new LoginController($this->loginHandler);
		    $this->fileUploadController = new FileUploadController($this->loginHandler);
			$this->pageCompositionView = new PageCompositionView();
		}
		
		public function DoControl(){			
			$this->loginPage = $this->loginController->DoControl();
		    $this->fileUploadPage = $this->fileUploadController->DoControl();
			$page = $this->pageCompositionView->RenderWebSite($this->loginPage, $this->fileUploadPage);
			
			return $page;
		}
	}
